//
//  ScrollViewViewController.m
//  Potatso
//
//  Created by MasterLambert on 2017/5/19.
//  Copyright © 2017年 TouchingApp. All rights reserved.
//

#import "ScrollViewViewController.h"

@interface ScrollViewViewController ()

@end

@implementation ScrollViewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = self.navTitle;
    
    UIScrollView * bgScrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds];
    UIImage * image = [UIImage imageNamed:self.imageName];
    CGFloat photoHeigt = image.size.height*kScreenW/image.size.width;
    bgScrollView.contentSize = CGSizeMake(self.view.size.width, photoHeigt);
    bgScrollView.showsVerticalScrollIndicator = YES;
    UIImageView * imageV = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, photoHeigt)];
    imageV.image = image;
    [bgScrollView addSubview:imageV];
    [self.view addSubview:bgScrollView];
}

@end
